//
//  LYArenaViewController.m
//  lottery
//
//  Created by 赵国腾 on 16/6/10.
//  Copyright © 2016年 赵国腾. All rights reserved.
//

#import "LYArenaViewController.h"

@interface LYArenaViewController ()

@end

@implementation LYArenaViewController

- (void)loadView {
    
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:LYScreenBounds];
    imageView.userInteractionEnabled = YES;
    imageView.image = [UIImage imageNamed:@"NLArenaBackground"];
    
    self.view  = imageView;
}

- (void)viewDidLoad {
    [super viewDidLoad];
        
    UISegmentedControl *segCtrl = [[UISegmentedControl alloc] initWithItems:@[@"足球", @"篮球"]];
    segCtrl.gt_width = 180;
    
    [segCtrl setBackgroundImage:[UIImage imageNamed:@"CPArenaSegmentBG"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    [segCtrl setBackgroundImage:[UIImage imageNamed:@"CPArenaSegmentSelectedBG"] forState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
    
    segCtrl.tintColor = LYColor(0, 142, 143);
    
    NSMutableDictionary *textAtt = [NSMutableDictionary dictionary];
    textAtt[NSForegroundColorAttributeName] = [UIColor whiteColor];
    
    [segCtrl setTitleTextAttributes:textAtt forState:UIControlStateNormal];
    
    segCtrl.selectedSegmentIndex = 0;
    
    self.navigationItem.titleView = segCtrl;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
